
module.exports = {
	data() {
		return {}
	},
	onLoad(options) {
		
		if(options.pid){
			uni.setStorageSync("pid",options.pid)    	
		}
		
	    this.$store.state.isBackTop = false
	},
	onPageScroll(e) { //根据距离顶部距离是否显示回到顶部按钮
				if (e.scrollTop > 400) { //当距离大于10时显示回到顶部按钮
					this.$store.state.isBackTop = true
					
				} else {
					this.$store.state.isBackTop = false
				}
	},
	methods: {
		
		toTop() {
			uni.pageScrollTo({
				scrollTop: 0,
				duration: 100,
			});
		 },
		
	},
}


